package com.logictech.activity.system.entity;

import java.util.Date;
import org.jeecgframework.p3.core.utils.persistence.Entity;

public class SystemUser implements Entity<Integer> {
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String userId;
	private String userName;
	private String password;
	private String userStat;
	private String userStatVal;
	private String token;
	private String loginApp;
	private String loginAppVal;
	private String creator;
	private String editor;
	private Date createDt;
	private Date editDt;
	private String deleteFlag;
	
	private String roleLog;

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserStat() {
		return this.userStat;
	}

	public void setUserStat(String userStat) {
		this.userStat = userStat;
	}

	public String getCreator() {
		return this.creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getEditor() {
		return this.editor;
	}

	public void setEditor(String editor) {
		this.editor = editor;
	}

	public Date getCreateDt() {
		return this.createDt;
	}

	public void setCreateDt(Date createDt) {
		this.createDt = createDt;
	}

	public Date getEditDt() {
		return this.editDt;
	}

	public void setEditDt(Date editDt) {
		this.editDt = editDt;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getLoginApp() {
		return loginApp;
	}

	public void setLoginApp(String loginApp) {
		this.loginApp = loginApp;
	}
	
	public String getLoginAppVal() {
		if("0".equals(loginApp)){
			loginAppVal = "不允许";
		}else if("1".equals(loginApp)){
			loginAppVal = "允许";
		}
		return loginAppVal;
	}

	public void setLoginAppVal(String loginAppVal) {
		this.loginAppVal = loginAppVal;
	}
	
	public String getUserStatVal() {
		if("NORMAL".equals(userStat)){
			userStatVal = "正常";
		}else if("INVALID".equals(userStat)){
			userStatVal = "无效";
		}
		
		return userStatVal;
	}

	public void setUserStatVal(String userStatVal) {
		this.userStatVal = userStatVal;
	}
	
	public String getRoleLog() {
		return roleLog;
	}

	public void setRoleLog(String roleLog) {
		this.roleLog = roleLog;
	}
	
	public String getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(String deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	@Override
	public String toString() {
		return "[id=" + id + ", 用户ID=" + userId + ", 用户名称=" + userName + ", 用户状态=" + getUserStatVal() + ", 允许登录app=" + getLoginAppVal()
		+ ", 用户角色=" + roleLog+ "]";
	}
}

